<?php

namespace app\model;

use think\Model;

/**
 * 访问统计
 *
 * @author yyzh
 */
class VisitStatistic extends Model {
	protected $table = 'visit_statistic';
	protected $pk = 'id';
	protected $field = array (
			'id',
			'host' 
	);
	/**
	 * 添加一条访问记录
	 *
	 * @param string $host
	 * @return number|\think\false|boolean
	 */
	public static function add($host = '0.0.0.0') {
		return self::create(['host'=>$host]);
	}
}
